import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import * as Actions from '../redux/actions/login';
import LoginView from '../views/LoginView';

function mapStateToProps(state) {
    const { loginData } = state;
    return {
        loginData
    }
}

function mapDispatchToProps(dispatch) {
    const actions = { ...Actions };
    return {
        actions: bindActionCreators(actions, dispatch)
    }
}

export default connect(mapStateToProps, mapDispatchToProps)(LoginView);